{$sem = ($smarty.now|date_format:"%U")+1}
{$semA = $sem+1}
{$semB = $sem+2}
{$semC = $sem+3}
{$semD = $sem+4}
{$semE = $sem+5}
{$semF = $sem+6}
{$semG = $sem+7}
{$semH = $sem+8}
{$semI = $sem+9}
{$semJ = $sem+10}
{$cnt = 0}
<table align='center' width='100%'>
    <tr>
    <th>Producto</th>
    {for $i=$sem to $semJ}
        <th>{$i}</th>
    {/for}
    <th>Total</th>
    </tr>
    {foreach item = curr_tabla from = $tabla}
    {$id = $curr_tabla.idx}
    {if $curr_tabla.total <> 0}
    <tr>
        <td style="background-color: ghostwhite;">{$curr_tabla.producto}</td>
        {for $i=$sem to $semJ}
        <td id="{$id}_{$i}" title="SEM {$i}" style="text-align: center;">&nbsp;</td>
        {/for}
        <td><strong>{$curr_tabla.total}</strong></td>
    </tr>
    {/if}
    {/foreach}
    <tr>
        <th>Totales</th>
        {for $var = $sem to $semJ}
        
        {if !isset($totsemana[$var])}
            {$totsemana[$var].cant = 0}
        {/if}
        
        <th>{$totsemana[$var].cant}</th>
        {$cnt = $cnt+$totsemana[$var].cant}
        {/for}
        <th>{$cnt}</th>
    </tr>
</table>
<script type='text/javascript'>{$scrpt}</script>